//
//  ARChannelTableViewFactory.m
//  AriseSamePro
//
//  Created by 包日守 on 15/10/31.
//  Copyright © 2015年 Arise. All rights reserved.
//

#import "ARChannelTableViewFactory.h"
#import "MusicViewController.h"
#import "ChannelTableViewController.h"

#import "ARCate5Model.h"

#import "AudioViewController.h"
#import "ARGlobalInterface.h"
#import "ARPictureTableViewController.h"
#import "WorldTableViewViewController.h"
#import "ARMovieViewController.h"
#import "ARVoteViewController.h"
#import "ARBuyViewController.h"

@implementation ARChannelTableViewFactory

+ (id) channelTableViewWithCate:(NSString *)cate WithTitle:(NSString *) title WithIndex:(NSString *) index

{
    
    NSLog(@"%@",[ARGlobalInterface channelSensesServerURLWithID:index]);
    
    if ([cate isEqualToString:@"3"]) {
        MusicViewController *musicVC =[[ MusicViewController alloc] init];
        musicVC.title = title;
        musicVC.index = index;
        musicVC.cate = cate;
        return musicVC;
        
    }
    if ([cate isEqualToString:@"8"])
    {
        AudioViewController *channelVC = [[AudioViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    if ([cate isEqualToString:@"2"])
    {
        ARPictureTableViewController *channelVC = [[ARPictureTableViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    if ([cate isEqualToString:@"1"])
    {
        WorldTableViewViewController *channelVC = [[WorldTableViewViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    
    if ([cate isEqualToString:@"4"])
    {
        ARMovieViewController *channelVC = [[ARMovieViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    
    if ([cate isEqualToString:@"6"])
    {
        ARVoteViewController *channelVC = [[ARVoteViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    
    if ([cate isEqualToString:@"10"])
    {
        ARBuyViewController *channelVC = [[ARBuyViewController alloc] init];
        channelVC.title = title;
        channelVC.index= index;
        channelVC.cate = cate;
        return channelVC;
    }
    
    return nil;
}


@end
